package com.example.interceptor;

/**
 * 登录者上下文信息
 */
public class UserSessionHolder {

    private static ThreadLocal<SSOSessionData> context = new ThreadLocal<>();

    public static SSOSessionData getCurrentUser() {
        return context.get();
    }

    public static void clearCurrentUser() {
        context.remove();
    }

    public static void setCurrentUser(SSOSessionData ssoSessionData) {
        context.set(ssoSessionData);
    }

    public static void get(SSOSessionData ssoSessionData) {
        context.set(ssoSessionData);
    }
}
